package com.ray.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.ray.bean.ApprovalBean;
import com.ray.bean.AuditLoggingBean;
import com.ray.bean.DeviceBean;
import com.ray.bean.ProcedureBean;
import com.ray.bean.ProcessBean;
import com.ray.bean.UserBean;

public interface ApprovalMapper {


	//获取当前用户能审批的人员id
	List<String> getApprovalIdByLoginId(Map map);

	//插入审批记录
	void insertAuditLogging(AuditLoggingBean auditLoggingBean);

	//批量插入数据
	void insertAllAuditLogging(@Param("listLogg")List<AuditLoggingBean> listLogg);

	//获取审批数据条数
	int getApprovalCount(Map map);

    //获取审批数据
	List<ApprovalBean> getApproval(Map map);

	//获取每个人的审批人员列表
	List<ApprovalBean> getApprovalPeopleList(@Param("approvalList")List<ApprovalBean> approvalList);

	//获取名下审批的人员id
	List<String> getHaveId(Map map);

	//移除修改
//	void updateRemove(Map map);

	//添加修改
	int addApperval(Map map);

	//查找审批
	List<ApprovalBean> findApproval(Map map);

	//删除审批
	int delete(Map map);
	
	/**
	 * 获取登录者的审核人
	* @date 2018年5月31日 下午6:40:19 
	* @author 李斌
	* @return List<String> 
	* @throws
	 */
	List<String> getApprovalUserIdByLoginUserId(Map map);
	
	/**
	 * 获取登录者的审核人,返回userName
	 */
	List<String> getApprovalUserBeanByLoginUserId(Map map);

	/**
	 * 校验自己是否可以审核自己
	 * @param map
	 * @return
	 */
	List<ApprovalBean> checkSelfApprovalPermission(Map map);
}
